CREATE TABLE jms_dm.dm_sqs_false_sign_sum_dt
(
    `statistic_date`    date COMMENT '统计日期',
    `data_type`         tinyint COMMENT '数据类型 1:网点 2：派件员',
    `agent_code`        varchar(100) COMMENT '代理区编码',
    `network_code`      varchar(100) COMMENT '网点编码',
    `delivery_code`     varchar(100) COMMENT '派件员编码',
    `network_name`      varchar(100) COMMENT '网点名称',
    `network_type`      varchar(100) COMMENT '网点名称',
    `delivery_name`     varchar(100) COMMENT '派件员名称',
    `agent_name`        varchar(100) COMMENT '代理区名称',
    `virt_code`         varchar(100) COMMENT '虚拟代理区编码',
    `virt_name`         varchar(100) COMMENT '虚拟代理区名称',
    `area_info_id`      varchar(100) COMMENT '片区ID',
    `area_info_code`      varchar(100) COMMENT '片区code',
    `area_info_desc`    varchar(100) COMMENT '片区名称',
    `provider_id`       varchar(100) COMMENT '省份ID',
    `provider_desc`     varchar(100) COMMENT '省份',
    `city_id`           varchar(100) COMMENT '城市ID',
    `city_desc`         varchar(100) COMMENT '城市',
    `area_id`           varchar(100) COMMENT '区/县ID',
    `area_desc`         varchar(100) COMMENT '区/县',
    `is_enable`         int COMMENT '网点状态 0待启用,1启用,2禁用',
    `is_suspend`        int COMMENT '是否暂停网点(1是,2否)',
    `false_sign_cnt`    bigint COMMENT '虚假签收数量',
    `effectiveness_cnt` bigint COMMENT '时效签收量',
    `reback_type_cnt`   bigint COMMENT '退回寄件商家投诉',
    `third_party_cnt`   bigint COMMENT '投入第三方客户未收到',
    `sign_owner_cnt`    bigint COMMENT '签收人：本人、家人、门口等',
    `sign_other_cnt`    bigint COMMENT '签收人：门卫、物业、超市、收发室等'
) ENGINE = OLAP DUPLICATE KEY(`statistic_date`, `data_type`, `agent_code`, `network_code`,`delivery_code` )
COMMENT '虚假签收统计'
PARTITION BY RANGE(`statistic_date`)
(START ('2023-04-01') END ('2023-05-31') EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(`network_code`) BUCKETS 3
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-180",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "3",
"in_memory" = "false",
"storage_format" = "V2"
);